import string
s = input()
s = string.capwords(s,'. ')
sentence = list(s)
for i in range(len(sentence)):
    if sentence[i] == 'i':
        if i == 0: continue
        if (sentence[i - 1] == ' ' or sentence[i - 1] == ',' or sentence[i - 1] == '.') and (sentence[i + 1] == ' ' or sentence[i + 1] == ',' or sentence[i + 1] == '.') :
            sentence[i] = 'I'
print("".join(sentence))

